import SwiftCrossUI
// Import whichever backend you need
import GtkBackend

class CounterState: Observable {
    @Observed var count = 0
}

@main
struct CounterApp: App {
    // Optionally, you can explicitly select which imported backend to use (this is done for
    // you if only one backend is imported).
    //  typealias Backend = GtkBackend

    let identifier = "dev.stackotter.CounterApp"

    let state = CounterState()

    var body: some Scene {
        WindowGroup("CounterApp") {
            HStack {
                Button("-") { state.count -= 1 }
                Text("Count: \(state.count)")
                Button("+") { state.count += 1 }
            }
            .padding(10)
        }
    }
}